//
//  IManager+ModuleMerchantDetailTraffic.m
//  RocketProject
//
//  Created by Wu Chengwei on 13-9-10.
//  Copyright (c) 2013年 Rocket. All rights reserved.
//

#import "IManager+ModuleMerchantDetailTraffic.h"
#import "NetUrlDefines.h"
#import "RequestUtlity.h"
#import "FrameworkRelativeDefines.h"
#import "RCMerchantDetailTrafficDataModel.h"

@implementation IManager(ModuleMerchantDetailTraffic)

-(int64_t)requestMerchantDetailTraffic:(NSString *)shopID withDelegte:(id<IManagerDelegate>)delegate{
    if (nil == shopID) {
        return kInvalidRequestId;
    }
    // 异步获取数据
    
    
    NSString *urlSuffix = [NSString stringWithFormat:kRCMerchantDetailTrafficPrefix,shopID];
    
    NSString *url = [RequestUtlity getFormattedUrl:urlSuffix];
    
    KFLog(@"request url %@",url);
    
//    NSDictionary *userInfo = [[NSDictionary alloc] initWithObjects:[NSArray arrayWithObject:@"CostDetail"] forKeys:[NSArray arrayWithObject:@"FakeJson"]];

    
    return [[IDataProvider sharedInstance] asyncFetchDataWithUserInfo:url
                                                             userInfo:nil
                                                      withCachePolicy:IDataCachePolicyLocalFileAndNetwork
                                                   withDataParseClass:[RCMerchantDetailTrafficDataModel class]
                                                     withDataDelegate:delegate];
}

@end
